<html>
<head>
<script language="javascript">
function button_onclick () {
  el = document.getElementById ('text');
  el.innerHTML = "you clicked me!";
}
</script>
</head>

<body>
  <span id="text">you haven't clicked me...</span><br/>
  <button id="button" onClick="javascript:button_onclick()">Click me!</button>
</body>

</html>